package cn.usian.exception;

import cn.usian.jyzx.model.vo.common.Result;
import cn.usian.jyzx.model.vo.common.ResultCodeEnum;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobleException {

    @ExceptionHandler(Exception.class)
    public Result result(JyzxException e){
        e.printStackTrace();
        return Result.build(null,e.getResultCodeEnum());
    }
}
